<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Document</title>
</head>
<style>
    html{
        perspective: 800px;
    }
.cube{
    width: 500px;
    height: 500px;
    /* background-color: #bfa; */
    margin: 200px auto;
    transform-style: preserve-3d;
    transform: rotateX(45deg) rotateZ(45deg);
    /*infinite无限次  linear匀速运动 */
    animation: run 20s infinite linear;
}
.cube >div{
    width: 500px;
    height: 500px;
    /* 为元素设置透明效果 */
    opacity: 0.9;
    position: absolute;
}
img{
    vertical-align: top;
}
.box1{
    transform: rotateY(90deg) translateZ(250px);
}
.box2{
    transform: rotateY(-90deg) translateZ(250px);
}
.box3{
    transform: rotateX(90deg) translateZ(250px);
}
.box4{
    transform: rotateX(-90deg) translateZ(250px);
}
.box5{
    transform: rotateY(180deg) translateZ(250px);
}
.box6{
    transform: rotateY(0deg) translateZ(250px);
}
@keyframes run {
    from{
        transform: rotateX(0) rotateZ(0);
    }
    to{
        transform: rotateX(1turn) rotateZ(1turn);
    }
}
</style>
<body>
    <div class="cube">
<div class="box1">
    <img src="./img/nba1.png" alt="">
</div>
<div class="box2">
    <img src="./img/nba2.png" alt="">
</div>
<div class="box3">
    <img src="./img/nba3.png" alt="">
</div>
<div class="box4">
    <img src="./img/nba4.png" alt="">
</div>
<div class="box5">
    <img src="./img/nba5.png" alt="">
</div>
<div class="box6">
    <img src="./img/nba6.png" alt="">
</div>
    </div>
</body>
</html>